package com.app.pojo;

import java.io.File;

public class FileInfo {
    String filename;
    long lastModified,size;
    boolean isFile;
    FileInfo(File file){
        filename=file.getName();
        lastModified=file.lastModified();
        size=file.length();
        isFile=file.isFile();
    }

    public String getFilename() {
        return filename;
    }

    public long getLastModified() {
        return lastModified;
    }

    public long getSize() {
        return size;
    }

    public boolean isFile() {
        return isFile;
    }

    @Override
    public String toString() {
        return "FileInfo{" +
                "filename='" + filename + '\'' +
                ", lastModified=" + lastModified +
                ", size=" + size +
                '}';
    }
}
